package com.Glow.reggie.common;

/**
 * @Author Glow
 * @Date 2022-07-29 17:39:26
 * @Description 基于ThreadLocal工具类，用户保存和获取用户的ID
 * @Version 1.0
 */
public class BaseContext {
    private static ThreadLocal<Long> threadLocal = new ThreadLocal<>();
    public static void setCurrentId(Long id)
    {
        threadLocal.set(id);
    }
    public static Long getCurrentId()
    {
       return threadLocal.get();
    }
}
